<?php

/**
 * MyHammer IndexedMemcache
 *
 * LICENSE
 *
 * This source file is subject to the GNU General Public License Version 3
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.myhammer.de/opensource/license/gpl.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to opensource@myhammer.de so we can send you a copy immediately.
 *
 * @category   MyHammer
 * @package    IndexedMemcache
 * @subpackage example05_insertManyModels
 * @license    http://www.myhammer.de/opensource/license/gpl.txt GNU General Public License Version 3
 * @version    1.0
 * @author     Steven Berg <berg@myhammer.de>
 */

class cTestModel extends cMemCacheModel {

    const ID = 'id';
    const USERNAME = 'username';
    const EMAIL = 'email';

    public function __construct() {
        $this->setId(NULL);
        $this->setUsername(NULL);
        $this->setEmail(NULL);
    }

    /**
     * set Id
     *
     * @param integer $iId
     */
    public function setId($iId) {
        parent::addData(self::ID, $iId);
    }

    /**
     * get Id
     *
     * @return integer
     */
    public function getId() {
        return parent::getData(self::ID);
    }

    /**
     * set Username
     *
     * @param string $sUsername
     */
    public function setUsername($sUsername) {
        parent::addData(self::USERNAME, $sUsername);
    }

    /**
     * get Username
     *
     * @return string
     */
    public function getUsername() {
        return parent::getData(self::USERNAME);
    }

    /**
     * set Email
     *
     * @param string $sEmail
     */
    public function setEmail($sEmail) {
        parent::addData(self::EMAIL, $sEmail);
    }

    /**
     * get Email
     *
     * @return <type>
     */
    public function getEmail() {
        return parent::getData(self::EMAIL);
    }

}